package com.atguigu.gulimall.product.vo.webvo;

import com.atguigu.gulimall.product.entity.SkuImagesEntity;
import com.atguigu.gulimall.product.entity.SkuInfoEntity;
import com.atguigu.gulimall.product.entity.SpuInfoDescEntity;
import lombok.Data;

import java.util.List;


@Data
public class SkuItemVo {
    private boolean hasStock = true;
    //1.sku基本信息：title,price
    SkuInfoEntity info;
    //2.sku轮播图片
    List<SkuImagesEntity> images;
    //3.销售版本组合：颜色、版本、内存——黑色;白色;蓝色
    List<ItemSaleAttrsVo> saleAttr;
    //4.spu的商品介绍（sku共享）：销售属性+展示图
    SpuInfoDescEntity desc;
    //5.规格与包装：所有属性分组下的所有属性
    List<SkuItemSaleAttrVo> groupAttrs;

    @Data
    public static class ItemSaleAttrsVo{
        private Long attrId;
        private String attrName;
        //当前属性有多少种版本：黑色,白色,蓝色
        private List<AttrValueWithSkuIdVo> attrValues;

    }

    @Data
    public static class SkuItemSaleAttrVo{
        private String groupName;
        private List<SpuBaseAttrVo> attrs;
    }

    @Data
    public static class SpuBaseAttrVo{
        private String attrName;
        private String attrValue;
    }

}
